package com.lei.datastructure.tree.bst;

/**
 * @Author LeiXiaoLei
 * @Date 2022/8/14 16:17
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        BST<Integer> bst = new BST<>();
        int[] nums = {5, 3, 6, 8, 4, 2};
        for (int num : nums) {
            bst.add(num);
        }
        bst.inOrder();
        Integer integer = bst.maximum();
        System.out.println(integer);
        bst.removeMax();
        bst.inOrder();
        integer = bst.maximum();
        System.out.println(integer);
    }
}
